package com.kingyea.mobilepolice.apimanage.requester.service;

import com.kingyea.mobilepolice.apimanage.requester.bean.Requester;
import com.kingyea.mobilepolice.apimanage.utils.page.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * @author Mr.Lin
 * @version v1.0.0
 * @description Requester 接口
 * @date Created in 2018-02-23 14:55:28
 */
public interface RequesterService {

    /**
     * 通过ID查找对象
     *
     * @param id
     * @return
     */
    Requester getById(Integer id) throws Exception;

    /**
     * 列表
     *
     * @param requester
     * @return
     */
    List<Requester> list(Requester requester) throws Exception;

    /**
     * 删除
     *
     * @param id
     * @return
     */
    int deleteById(Integer id) throws Exception;

    /**
     * 添加
     *
     * @param requester
     * @return
     */
    Requester save(Requester requester) throws Exception;

    /**
     * 更新
     *
     * @param requester
     * @return
     */
    Requester update(Requester requester) throws Exception;

    /**
     * 条件搜索，供管理界面展示
     */
    PageInfo<List<Requester>> searchByCondition(Map<String, Object> map) throws Exception;

    /**
     * 审核
     */
    Object check(Map<String, Object> map) throws Exception;

    /**
     * 带条件统计接口数量
     *
     * @param map
     * @return java.lang.Object
     * @author Mr.Lin
     * @date 2018/3/23 10:40
     */
    Integer countByCondition(Map<String, Object> map);

    /**
     * 通过organization统计
     *
     * @param map
     * @return
     */
    Object requesterCountByOrganization(Map<String, Object> map) throws Exception;

    /**
     * 每月请求数总量
     *
     * @param map
     * @return
     */
    Object monthlyRequesterCount(Map<String, Object> map) throws Exception;
}
